package com.lill.workflow.api;

import com.lill.common.component.util.R;
import com.lill.workflow.constant.BusinessType;
import com.lill.workflow.model.WorkflowInfoModel;
import com.lill.workflow.service.IWorkflowInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * Controller
 *
 * @author lill
 * @date 2019-05-26 12:05:20
 */
@RestController
@RequestMapping("api/workflow/info")
public class WorkflowInfoApi {
    @Autowired
    private IWorkflowInfoService workflowInfoService;

    /**
     * 查看列表
     */
    @RequestMapping("/querySelect")
    public R querySelect(@RequestBody Map<String, Object> params) {
        List<WorkflowInfoModel> workflowInfoList = workflowInfoService.queryList(params);
        return R.ok().put("list", workflowInfoList);
    }
    /**
     * 获取流程枚举
     */
    @RequestMapping("/getBusinessType")
    public R getBusinessType() {
        return R.ok().put("list", BusinessType.getList());
    }

}
